package com.liujit.validator.constraints.validate;

import com.liujit.validator.constants.PatternConstant;
import com.liujit.validator.constraints.Mobile;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author: liujun
 * @date: 2021/6/18 3:15 下午
 * @description: 手机号校验
 */
public class MobileValid extends BaseValid implements ConstraintValidator<Mobile, String> {

    @Override
    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        return super.valid(PatternConstant.MOBILE, s);
    }
}
